#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QDebug>
#include<QCloseEvent>
#include<QMouseEvent>
#include<QPaintEvent>
#include<QMessageBox>
#include "Method/calibration.h"
#include"Method/coordinate.h"
#include"UI/mainform.h"
#include"Method/uniqueid.h"
#include"commondata.h"
#include"Method/explanation.h"
#include"fileInOut/importfile.h"
#include"fileInOut/importcoefile.h"
#include"fileInOut/importstructfile.h"
#include"Decode/decode.h"
#include "serial.h"
namespace Ui {
class Widget;
}

class Widget : public QWidget{
    Q_OBJECT
public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
protected:
    void paintEvent(QPaintEvent *event);
    void closeEvent(QCloseEvent *event);
    bool eventFilter(QObject *obj, QEvent *event);
private:
    MainForm * mainForm;
    calibration * mCalibration;
    coordinate * mCoordinate;
    uniqueID * mUniqueID;
    commonData * mCommonData;
    explanation * mExplanation;
    importFile * mImportFile;
    Serial * mSerial;
    void empowerPushButton();
    void chooseConnectModel();
    void initialForm();
    void initialMethod();
    void setMethod(Method * arg);
    void decodeModelChoose();
private slots:
    void readStructSlots();
    void readCoeffSlots();
};

#endif // WIDGET_H
